Radaer api la side - part two initialisation - #698
Radaer api la side - part two initialisation#698Alan J Hewitt (alanjhewitt) wants to merge 45 commits into
Conversation
|
|
||
| """ | ||
| Copy this template and complete to add your macro | ||
| class vn32_t683(MacroUpgrade): |
There was a problem hiding this comment.
Given the metadata changes, this is the only file where you should add an upgrade macro. When apply_macros.py gets run, it will copy the macro to all relevant places based on the metadata inheritance. Please revert all the other changes to versions.py files.
LFRic macro guidance: https://metoffice.github.io/simulation-systems/Development/macros.html#upgrade-macros-in-lfric
|
Hi Mohit, This development is now ready for SciTech review. Regards, Alan |
iboutle
left a comment
There was a problem hiding this comment.
A couple of minor points
| ["namelist:aerosol", | ||
| "glomap_mode"]) | ||
|
|
||
| if glomap_mode == "'dust_and_clim'": |
There was a problem hiding this comment.
I would suggest removing this and just setting mode_setup=SUBCOCSSDU_7mode in the upgrade macro. The value when dust and clim is selected is irrelevant because it's trigger ignored, but doing this makes duonly_2mode the default value in the GUI, and I think 7mode would be the better default to appear when someone switches on ukca.
| ! sustrat turned on | ||
| l_ukca_radaer_sustrat_local = .true. | ||
|
|
||
| if ( l_radaer) then |
There was a problem hiding this comment.
Should this whole routine just be wrapped in "if l_radaer", i.e. the call from gungho_model_mod, rather than repeated instances inside the routine?
Mohit Dalvi (mcdalvi)
left a comment
There was a problem hiding this comment.
Passing back to Alan
| !> @brief RADAER initialisation subroutine for science configuration | ||
|
|
||
| module um_radaer_init_mod | ||
|
|
There was a problem hiding this comment.
I am aware this is a legacy thing, but for new modules/ routines could the 'um_' prefix be avoided?
There was a problem hiding this comment.
yes, i can change this. i will make it a separate commit so that changes in this file can still be seen.
There was a problem hiding this comment.
update - it turns out that "git mv" command preserves history.
| use ukca_radaer_lfric_init_mod, only: ukca_radaer_lfric_init | ||
|
|
||
| use ukca_config_specification_mod, only: i_sussbcocdu_7mode, & | ||
| i_du_2mode |
There was a problem hiding this comment.
UKCA variables and routines are expected to be accessed only via ukca_api_mod and usually aliased with a ukca_ prefix to differentiate from local variables.
|
|
||
| use ukca_config_specification_mod, only: i_sussbcocdu_7mode, & | ||
| i_du_2mode | ||
|
|
There was a problem hiding this comment.
UKCA variables expected to be accessed only via ukca_api_mod.
| case default | ||
| write( log_scratch_space, '(A,I0)' ) & | ||
| 'Developers should include additional mode settings here: ', mode_setup | ||
| call log_event( log_scratch_space, LOG_LEVEL_ERROR ) |
There was a problem hiding this comment.
The message could be clarified that the option passed in is not supported.
|
Your CLA signature was found on the base branch, but you appear to have modified the CONTRIBUTORS.md file in this PR. Please do not edit the CONTRIBUTORS.md file. If you have already signed the CLA, revert changes to the file and your signature will be picked up. |
PR Summary
Sci/Tech Reviewer: Mohit Dalvi (@mcdalvi)
Code Reviewer: Pierre Siddall (@Pierre-siddall)
I developed the original lfric to radaer functionality in 2020. Like a lot of developments back then, it was needed in a hurry and so I developed a fudged solution with technical debt.
We will need user flexibility soon to be able to run radaer with different user settings, hence this part two of two development.
In part two, the previously hard coded lists (from part one) are instead generated from user settings based on the value of i_mode_setup if running with setting "ukca". For settings "glomap_clim" and "dust_and_clim", the user is not allowed to set i_mode_setup as this will always be setting "8" aka SUBCOCSSDU7mode.
These lists are to be determined during the initialisation step and saved for the rest of the run.
I will also include some documentation to describe the RADAER API.
It was not intended but RADAER was previously hardcoded with l_ukca_radaer_sustrat set as true. As this ticket includes this as a namelist item, I have set made this default to true for all current suites. This is a legitimate science option, although later some suites may wish to turn this off.
Code Quality Checklist
Testing
trac.log
Test Suite Results - lfric_apps - BoB_radaer_api_la_side_5s/run1
Suite Information
Task Information
✅ succeeded tasks - 1602
Security Considerations
Performance Impact
AI Assistance and Attribution
Documentation
Please see build of documentation here
https://wwwspice/~alan.j.hewitt/lfric_apps/radaer_api_la_side_5/html/science_guide/radaer/index.html
PSyclone Approval
Sci/Tech Review
(Please alert the code reviewer via a tag when you have approved the SR)
Code Review